package Reeks5.VanRansbeeck.Kevin.Model.States.Game;

import java.util.logging.Level;
import java.util.logging.Logger;

public class NewState implements PokerSpelState {
    
    public String getStatus() {
        return "New Game ... Waiting for action";
    }

    public void flop(SpelStateContext aThis) {
        try {
            throw new IllegalGameActionException("Flop kan alleen vanuit pre-flop.");
        } catch (IllegalGameActionException ex) {
            Logger.getLogger(NewState.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public void turn(SpelStateContext aThis) {
        try {
            throw new IllegalGameActionException("Turn kan alleen na flop komen.");
        } catch (IllegalGameActionException ex) {
            Logger.getLogger(NewState.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public void river(SpelStateContext aThis) {
        try {
            throw new IllegalGameActionException("River kan alleen na turn komen.");
        } catch (IllegalGameActionException ex) {
            Logger.getLogger(NewState.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public void showdown(SpelStateContext aThis) {
        try {
            throw new IllegalGameActionException("Er moet eerst _IETS_ van actie zijn");
        } catch (IllegalGameActionException ex) {
            Logger.getLogger(NewState.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
    
    public void blinds(SpelStateContext aThis) {
        aThis.setSpelState(new BlindState());
    }
    
    public void winner(SpelStateContext aThis) {
        try {
            throw new IllegalGameActionException("Winnaar kan alleen vanuit showdown state komen.");
        } catch (IllegalGameActionException ex) {
            Logger.getLogger(NewState.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public void reset(SpelStateContext aThis) {
        try {
            throw new IllegalGameActionException("Reset kan alleen vanuit winnaar state komen.");
        } catch (IllegalGameActionException ex) {
            Logger.getLogger(NewState.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

}
